import java.util.Scanner;



public class Main {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);

		int testCase = 0;

		while (true) {
			testCase = input.nextInt();
			if(testCase==42){
				break;
			}
			System.out.println(testCase);
		}
	}
}
